﻿using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BF_160
{
    public class MyGlobal
    {
        public static FrmYT frmYT;
        public static FrmYDL frmYDL;
        public static FrmYDR frmYDR;

        private static MySerialData ytSerialData = null;
        private static MySerialData ydlSerialData = null; 
        public static bool IsChanelBusy = false;

        public static int FristShow = 1; //1:焰条,2:左焰弹

        public static string ytPortName;
        public static string ydlPortName;
        public static string ydrPortName;


        public static MySerialData GetYTSerialData()
        {
            if (ytSerialData == null)
            {
                ytSerialData = new MySerialData(MyGlobal.ytPortName);
            }
            return ytSerialData;
        }
        public static MySerialData GetYDLSerialData()
        {
            if (ydlSerialData == null)
            {
                ydlSerialData = new MySerialData(MyGlobal.ydlPortName);
            }
            return ydlSerialData;
        } 

        public static string logFile = "";

        static public string Version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();

        public class TitalStyle
        {
            public static int TitalX = 459;
            public static int TitalY = 10;

            public static int LineY = 85;

            public static int CycleOffsetY = -70;

        }
    }
}
